<?php defined('InTuntronKJ') or exit('Access Invalid!');?>
<link rel="stylesheet" type="text/css" href="<?php echo RESOURCE_SITE_URL;?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css"  />

<div class="wrap">
  <div class="tabmenu">
    <ul class="tab pngFix">
  <li class="active"><a href="index.php?ac=predeposit&op=index">佣金列表</a></li></ul>
    <a class="ncu-btn3" href="index.php?ac=member_invite">马上推广</a>
  </div>

    <table class="search-form">
      <tr>
        <th>账户余额<?php echo $lang['nc_colon']; ?></th>
        <td><?php echo $output['member_info']['available_predeposit']; ?> <?php echo $lang['currency_zh'];?> <a href="index.php?ac=predeposit&op=pd_cash_add">提现</a><td>

      </tr>
    </table>

  <table class="ncu-table-style">
    <thead>
      <tr>
        <th class="w100">推广人</th>
        <th class="w150">注册时间</th>
        <th class="w150">上次登录</th>
		    <th class="w100">登录次数</th>
        <th class="w100">获得佣金(<?php echo $lang['currency_zh'];?>)</th>
        <th class="w150'">获得积分</th>
        <th class="w100"><?php echo $lang['predeposit_paystate']; ?></th>
        <th><?php echo $lang['nc_handle'];?></th>
      </tr>
    </thead>
    <tbody>
      <?php if (count($output['list'])>0) { ?>
      <?php foreach($output['list'] as $val) { ?>
      <tr class="bd-line">
        <td class="goods-num"><?php echo $val['member_name'];?></td>
        <td class="goods-time"><?php echo date('Y-m-d H:i:s',$val['member_time']);?></td>
        <td><?php echo date('Y-m-d H:i:s',$val['member_old_login_time']);?></td>
		<td><?php echo $val['member_login_num'];?></td>
        <td class="goods-price"><?php echo intval($val['yjlog']['lg_amount']);?></td>
        <td class="goods-point"><?php echo intval($val['point']['pl_points']);?></td>
        <td><?php echo $val['yjlog']['lg_desc']?$val['yjlog']['lg_desc']:'该店铺未激活';?></td>
        <td>
          <?php if($val['yjlog']['lg_desc']!=='已经进账' && intval($val['yjlog']['lg_amount'])>0){ ?>
          <p><a class="ncu-btn2 mt5" href="<?php echo urlShop('predeposit','getyj',array('lg_id'=>$val['yjlog']['lg_id']));?>" target="_blank">提取佣金</a></p>
          <?php }?>
          <p><a class="ncu-btn2 mt5" href="<?php echo urlShop('show_store','index',array('store_id'=>$val['store_id']),$val['store_domain']);?><?php if($_SESSION['member_id']) echo  '?rid='.$_SESSION['member_id'];?>" target="_blank">查看店铺</a></p>

          </td>
      </tr>
      <?php } ?>
      <?php } else {?>
      <tr>
        <td colspan="20" class="norecord"><i>&nbsp;</i><span><?php echo $lang['no_record'];?></span></td>
      </tr>
      <?php } ?>
    </tbody>
    <tfoot>
      <?php if (count($output['list'])>0) { ?>
      <tr>
        <td colspan="20"><div class="pagination"><?php echo $output['show_page']; ?></div>
        </td>
      </tr>
      <?php } ?>
    </tfoot>
  </table>
</div>
<script charset="utf-8" type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/jquery-ui/i18n/zh-CN.js" ></script>